<%= render :partial => 'navigation' %>

<% if @signed %>
  <span>Add a friend, if you know profile address</span>
  <% form_tag Kopal.route.organise_friend(:action2 => 'start') do %>
    <%= text_field_tag :identity, 'http://' %>
    <%= submit_tag 'Add friend!' %>
  <% end %>
  <% if((pending = Kopal::UserFriend.find_all_by_friendship_state('pending')).size.nonzero?) %>
    <h2>Friends pending your approval </h2>
    <%= render :partial => '_shared/friend_ribbon',
      :collection => pending, :as => :friend %>
  <% end %>
  <% if((waiting = Kopal::UserFriend.find_all_by_friendship_state('waiting')).size.nonzero?) %>
    <h2>Requests waiting friends approval </h2>
    <%= render :partial => '_shared/friend_ribbon',
      :collection => waiting, :as => :friend %>
  <% end %>
<% end %>


<h2>Friends</h2>